package storage;

import java.util.Date;
import java.util.logging.Logger;

public class Task implements Cloneable {
	private int id_;
	private String title_;
	private Date deadline_;
	private TaskStatus status_ = TaskStatus.INCOMPLETE;
	private TaskPriority priority_ = TaskPriority.MEDIUM;
	private int amount_ = 1;
	private int interval_ = 0;
	private final static Logger LOGGER = Logger.getLogger(Task.class.getName());

	public Task() {
		id_ = 0;
		title_ = "";
	}

	public Task(String tmpTitle, Date tmpDate, int amnt, int period,
			TaskStatus st, TaskPriority p) {
		this.setTitle(tmpTitle);
		this.setDeadline(tmpDate);
		this.setAmount(amnt);
		this.setInterval(period);
		this.setStatus(st);
		this.setPriority(p);
	}

	public int getId() {
		return id_;
	}

	public void setId(int id) {
		this.id_ = id;
	}

	public String getTitle() {
		return title_;
	}

	public void setTitle(String title) {
		this.title_ = title;
	}

	public Date getDeadline() {
		return deadline_;
	}

	public void setDeadline(Date deadline) {
		this.deadline_ = deadline;
	}

	public TaskStatus getStatus() {
		return status_;
	}

	public void setStatus(TaskStatus status) {
		this.status_ = status;
	}

	public TaskPriority getPriority() {
		return priority_;
	}

	public void setPriority(TaskPriority priority) {
		this.priority_ = priority;
	}

	public int getAmount() {
		return this.amount_;
	}

	public void setAmount(int numberOfOccurrences) {
		this.amount_ = numberOfOccurrences;
	}

	public int getInterval() {
		return this.interval_;
	}

	public void setInterval(int period) {
		this.interval_ = period;
	}

	public Object clone() {
		try {
			return super.clone();
		} catch (CloneNotSupportedException e) {
			return null;
		}
	}

}